WPS Office.apk(点击下载) / utp.java


package defpackage;

import cn.wps.moffice.common.infoflow.internal.cards.thirdpartyad.ThirdPartyAdParams;
import cn.wps.show.app.KmoPresentation;
import com.mopub.mobileads.VastExtensionXmlManager;
import defpackage.tvq;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/* renamed from: utp  reason: default package */
public final class utp {
    public bbo brv = new uug(this.kVG, this.ckw);
    public clu ckw = this.ckx.apK();
    public cls ckx;
    public KmoPresentation kVG;
    public tvq vHl = tvq.P(this.kVG.Jy());

    public utp(KmoPresentation kmoPresentation, cls cls) {
        this.kVG = kmoPresentation;
        this.ckx = cls;
    }

    private void b(coj coj, int i, String str) {
        coj.N("p", str);
        this.brv.f(coj, i);
        coj.O("p", str);
    }

    public void A(coj coj) {
        if (this.vHl.ftV()) {
            coj.N("p", "embeddedFontLst");
            ArrayList<tvq.e> arrayList = new ArrayList();
            this.vHl.ftU().c(arrayList);
            for (tvq.e eVar : arrayList) {
                coj.N("p", "embeddedFont");
                bac.a(coj, eVar.fur(), "p", "font");
                if (eVar.fut()) {
                    b(coj, eVar.fus(), "regular");
                }
                if (eVar.abi()) {
                    b(coj, eVar.abh(), "bold");
                }
                if (eVar.abk()) {
                    b(coj, eVar.abj(), "italic");
                }
                if (eVar.fuv()) {
                    b(coj, eVar.fuu(), "boldItalic");
                }
                coj.O("p", "embeddedFont");
            }
            coj.O("p", "embeddedFontLst");
        }
    }

    public void a(uum uum) throws IOException {
        int fnX = this.kVG.fnX();
        for (int i = 0; i < fnX; i++) {
            uuh uuh = new uuh(this.kVG.ajl(i), this.ckw.b(ckw.chj, i + 1).apL());
            tqy tqy = uuh.kIg;
            clu apK = uuh.vMV.apK();
            uuh.vMs = new HashMap();
            tqm tqm = tqy.uVV.uVQ.uVA;
            ArrayList arrayList = new ArrayList();
            uuh.a(tqy, tqm, apK, arrayList);
            utx utx = new utx(uuh.uWr);
            List<Map<ckx, clt>> a = utx.a(uuh.kIg.uVV, uuh.vMV.apK());
            uui uui = new uui(uuh.uWr, uuh.vMV.apK());
            cls cls = uuh.vMV;
            tqy tqy2 = uuh.kIg;
            col col = new col(uul.a(cls));
            two X = two.X(tqy2.Jy());
            col.startDocument();
            col.N("p", "sld");
            col.M("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
            col.M("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            col.M("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
            if (X.fyW()) {
                col.i(ThirdPartyAdParams.ACTION_AD_SHOW, X.dih());
            }
            if (X.fyL()) {
                col.i("showMasterSp", X.fyK());
            }
            if (X.fyJ()) {
                col.i("showMasterPhAnim", X.fyI());
            }
            new usp(tqy2.uVV, uuh.uWr.uTy.IR(), uui).a(col);
            col.N("p", "clrMapOvr");
            if (tqy2.fqu()) {
                uso.a(col, X.fwZ(), "a", "overrideClrMapping");
            } else {
                col.N("a", "masterClrMapping");
                col.O("a", "masterClrMapping");
            }
            col.O("p", "clrMapOvr");
            if (X.fyH()) {
                new utm(X.fyG(), uui).a(col);
            }
            if (X.fyF()) {
                new utk(X.fyE(), uui).a(col);
            }
            col.O("p", "sld");
            col.endDocument();
            tsn tsn = uuh.kIg.uVV.uVS;
            if (tsn != null) {
                new uuk(uuh.uWr, uuh.vMV, tsn).fPk();
            }
            tqy tqy3 = uuh.kIg;
            clu apK2 = uuh.vMV.apK();
            tqz fqp = tqy3.fqp();
            if (fqp != null) {
                apK2.a(ckw.chk, uue.a(uuh.uWr, fqp));
            }
            if (tqy3.uVX != null) {
                uud uud = new uud(uuh.uWr, tqy3, apK2.a(ckw.cho, uuh.p(tqy3)).apL());
                uui uui2 = new uui(uud.kVG, uud.ckF.apK());
                col col2 = new col(uul.a(uud.ckF));
                col2.startDocument();
                col2.N("p", "notes");
                col2.M("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
                col2.M("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
                col2.M("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
                twd S = twd.S(uud.vMI.Jy());
                if (S.fxg()) {
                    col2.i("showMasterPhAnim", S.fxf());
                }
                if (S.fxi()) {
                    col2.i("showMasterSp", S.fxh());
                }
                new usp(uud.vMI.uVV, uud.kVG.uTy.IR(), uui2).a(col2);
                col2.N("p", "clrMapOvr");
                if (uud.uVn.fqu()) {
                    uso.a(col2, S.fwZ(), "a", "overrideClrMapping");
                } else {
                    col2.N("a", "masterClrMapping");
                    col2.O("a", "masterClrMapping");
                }
                col2.O("p", "clrMapOvr");
                col2.O("p", "notes");
                col2.endDocument();
                uui2.nq();
                clu apK3 = uud.ckF.apK();
                apK3.a(ckw.chj, uud.kVG.j(uud.uVn) + 1);
                apK3.a(ckw.chn, 1);
            }
            if (two.X(tqy3.Jy()).fyY()) {
                ckx ckx2 = ckw.chc;
                int i2 = utt.vMt + 1;
                utt.vMt = i2;
                new utt(apK2.a(ckx2, i2).apL(), tqy3).nq();
            }
            if (arrayList != null && arrayList.size() > 0) {
                new uts(uuh.uWr, uuh.vMs).eq(arrayList);
            }
            utx.a(tqy3.uVV, uui, a);
            uty.a(uuh.kIg.fqg().uVB, uuh.uWr, uuh.vMV.apK());
            uui.nq();
            uum.vNf = ((uum.vNe ? 45.0d : 90.0d) / ((double) uum.lTL)) + uum.vNf;
            int i3 = (int) uum.vNf;
            if (i3 > uum.vNg) {
                uum.vNd.ajp(i3);
                uum.vNg = i3;
            }
        }
    }

    public void fPe() throws IOException {
        int fnW = this.kVG.fnW();
        for (int i = 0; i < fnW; i++) {
            uuf uuf = new uuf(this.kVG.ajk(i), this.ckw.b(ckw.chl, i + 1).apL());
            ArrayList arrayList = new ArrayList();
            int fqG = uuf.vEn.fqG();
            for (int i2 = 0; i2 < fqG; i2++) {
                tqz ajE = uuf.vEn.ajE(i2);
                clt a = uuf.vMK.apK().a(ckw.chk, uue.a(uuf.uWr, ajE));
                uue uue = new uue(ajE, a.apL());
                col col = new col(uul.a(uue.vMJ));
                col.startDocument();
                col.N("p", "sldLayout");
                col.M("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
                col.M("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
                col.M("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
                twm V = twm.V(uue.vEl.Jy());
                if (V.fyN()) {
                    col.J("matchingName", V.fyM());
                }
                if (V.fyO()) {
                    col.i("preserve", V.fqK());
                }
                if (V.fyJ()) {
                    col.i("showMasterPhAnim", V.fyI());
                }
                if (V.fyL()) {
                    col.i("showMasterSp", V.fyK());
                }
                if (V.iD()) {
                    col.J(VastExtensionXmlManager.TYPE, uun.vLb.get(Integer.valueOf(V.type())));
                }
                if (V.fyQ()) {
                    col.i("userDrawn", V.fyP());
                }
                tqz tqz = uue.vEl;
                clu apK = uue.vMJ.apK();
                uue.vMs = new HashMap();
                tqm tqm = tqz.uVV.uVQ.uVA;
                ArrayList arrayList2 = new ArrayList();
                uue.a(tqz, tqm, apK, arrayList2);
                utx utx = new utx(uue.uWr);
                List<Map<ckx, clt>> a2 = utx.a(uue.vEl.uVV, uue.vMJ.apK());
                uui uui = new uui(uue.uWr, uue.vMJ.apK());
                new usp(uue.vEl.uVV, uue.uWr.uTy.IR(), uui).a(col);
                col.N("p", "clrMapOvr");
                if (uue.vEl.fqu()) {
                    uso.a(col, V.fwZ(), "a", "overrideClrMapping");
                } else {
                    col.N("a", "masterClrMapping");
                    col.O("a", "masterClrMapping");
                }
                col.O("p", "clrMapOvr");
                if (V.fyH()) {
                    new utm(V.fyG(), uui).a(col);
                }
                if (V.fyF()) {
                    new utk(V.fyE(), uui).a(col);
                }
                if (V.fyD()) {
                    usr.a(col, V.fyC());
                }
                col.O("p", "sldLayout");
                col.endDocument();
                if (uue.vEl.fqE()) {
                    new uuk(uue.uWr, uue.vMJ, uue.vEl.fqe()).fPk();
                }
                uty.a(uue.vEl.fqg().uVB, uue.uWr, uue.vMJ.apK());
                if (arrayList2 != null && arrayList2.size() > 0) {
                    arrayList2.size();
                    new uts(uue.uWr, uue.vMs).eq(arrayList2);
                }
                utx.a(uue.vEl.uVV, uui, a2);
                uui.nq();
                tqz tqz2 = uue.vEl;
                clu apK2 = uue.vMJ.apK();
                int d = uue.uWr.d(tqz2.fqq());
                if (d < 0) {
                    d = 0;
                }
                apK2.a(ckw.chl, d + 1);
                arrayList.add(a.ckE);
            }
            utx utx2 = new utx(uuf.uWr);
            List<Map<ckx, clt>> a3 = utx2.a(uuf.vEn.uVV, uuf.vMK.apK());
            uui uui2 = new uui(uuf.uWr, uuf.vMK.apK());
            uuf.a(uuf.vMK, uuf.vEn, arrayList, uui2);
            uty.a(uuf.vEn.fqg().uVB, uuf.uWr, uuf.vMK.apK());
            utx2.a(uuf.vEn.uVV, uui2, a3);
            uui2.nq();
            tsn fqe = uuf.vEn.fqe();
            if (fqe != null) {
                new uuk(uuf.uWr, uuf.vMK, fqe).fPj();
            }
        }
    }

    public void x(coj coj) {
        coj.N("p", "sldMasterIdLst");
        int fnW = this.kVG.fnW();
        for (int i = 0; i < fnW; i++) {
            tra ajk = this.kVG.ajk(i);
            clt a = this.ckw.a(ckw.chl, i + 1);
            coj.N("p", "sldMasterId");
            coj.c("id", ajk.id);
            coj.h("r", "id", a.ckE);
            coj.O("p", "sldMasterId");
        }
        coj.O("p", "sldMasterIdLst");
    }

    public void y(coj coj) {
        coj.N("p", "sldIdLst");
        int fnX = this.kVG.fnX();
        for (int i = 0; i < fnX; i++) {
            tqy ajl = this.kVG.ajl(i);
            clt a = this.ckw.a(ckw.chj, i + 1);
            coj.N("p", "sldId");
            coj.c("id", ajl.id);
            coj.h("r", "id", a.ckE);
            coj.O("p", "sldId");
        }
        coj.O("p", "sldIdLst");
    }

    public void z(coj coj) {
        if (this.vHl != null && this.vHl.ftR()) {
            ArrayList<tvq.b> arrayList = new ArrayList();
            this.vHl.ftQ().c(arrayList);
            coj.N("p", "custShowLst");
            for (tvq.b bVar : arrayList) {
                if (bVar != null) {
                    coj.N("p", "custShow");
                    coj.r("id", bVar.id());
                    coj.J("name", bVar.name());
                    coj.N("p", "sldLst");
                    int size = bVar.fuo().size();
                    for (int i = 0; i < size; i++) {
                        tqy cg = this.kVG.cg((long) ((int) ((long) bVar.fuo().get(i))));
                        clt clt = null;
                        if (cg != null) {
                            clt = this.ckw.b(ckw.chj, this.kVG.j(cg) + 1);
                        }
                        if (clt != null) {
                            coj.N("p", "sld");
                            coj.h("r", "id", clt.ckE);
                            coj.O("p", "sld");
                        }
                    }
                    coj.O("p", "sldLst");
                    coj.O("p", "custShow");
                }
            }
            coj.O("p", "custShowLst");
        }
    }
}